home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 26.zip / BS1 part 26 / Aztec C v5.2a disk 4.adf / 204inc_h.lzh / graphics / clip.h next >
C/C++ Source or Header  |  1991-03-14  |  3KB  |  89 lines

  1. #ifndef    GRAPHICS_CLIP_H
  2. #define    GRAPHICS_CLIP_H
  3. /*
  4. **    $Filename: graphics/clip.h $
  5. **    $Release: 2.04 $
  6. **    $Revision: 37.1 $
  7. **    $Date: 91/01/28 $
  8. **
  9. **
  10. **
  11. **    (C) Copyright 1985,1986,1987,1988,1989 Commodore-Amiga, Inc.
  12. **        All Rights Reserved
  13. */
  14.  
  15. #ifndef EXEC_TYPES_H
  16. #include <exec/types.h>
  17. #endif
  18.  
  19. #ifndef GRAPHICS_GFX_H
  20. #include <graphics/gfx.h>
  21. #endif
  22. #ifndef EXEC_SEMAPHORES_H
  23. #include <exec/semaphores.h>
  24. #endif
  25. #ifndef UTILITY_HOOKS_H
  26. #include <utility/hooks.h>
  27. #endif
  28.  
  29. /* structures used by and constructed by windowlib.a */
  30. /* understood by rom software */
  31.  
  32. #define NEWLOCKS
  33.  
  34. struct Layer
  35. {
  36.     struct  Layer *front,*back;
  37.     struct  ClipRect    *ClipRect;  /* read by roms to find first cliprect */
  38.     struct  RastPort    *rp;
  39.     struct  Rectangle    bounds;
  40.     UBYTE   reserved[4];
  41.     UWORD   priority;            /* system use only */
  42.     UWORD   Flags;            /* obscured ?, Virtual BitMap? */
  43.     struct  BitMap *SuperBitMap;
  44.     struct  ClipRect *SuperClipRect; /* super bitmap cliprects if VBitMap != 0*/
  45.                   /* else damage cliprect list for refresh */
  46.     APTR    Window;          /* reserved for user interface use */
  47.     WORD   Scroll_X,Scroll_Y;
  48.     struct  ClipRect *cr,*cr2,*crnew;    /* used by dedice */
  49.     struct  ClipRect *SuperSaveClipRects; /* preallocated cr's */
  50.     struct  ClipRect *_cliprects;    /* system use during refresh */
  51.     struct  Layer_Info    *LayerInfo;    /* points to head of the list */
  52.     struct  SignalSemaphore Lock;
  53.     struct  Hook *BackFill;
  54.     ULONG   reserved1;
  55.     struct  Region *ClipRegion;
  56.     struct  Region *saveClipRects;    /* used to back out when in trouble*/
  57.     WORD    Width,Height;        /* system use */
  58.     UBYTE   reserved2[18];
  59.     /* this must stay here */
  60.     struct  Region  *DamageList;    /* list of rectangles to refresh
  61.                        through */
  62. };
  63.  
  64. struct ClipRect
  65. {
  66.     struct  ClipRect *Next;        /* roms used to find next ClipRect */
  67.     struct  ClipRect *prev;        /* ignored by roms, used by windowlib */
  68.     struct  Layer   *lobs;        /* ignored by roms, used by windowlib */
  69.     struct  BitMap  *BitMap;
  70.     struct  Rectangle    bounds;     /* set up by windowlib, used by roms */
  71.     struct  ClipRect *_p1,*_p2;     /* system reserved */
  72.     LONG    reserved;            /* system use */
  73. #ifdef NEWCLIPRECTS_1_1
  74.     LONG    Flags;            /* only exists in layer allocation */
  75. #endif                    /* MUST be multiple of 8 bytes to buffer */
  76. };
  77.  
  78. /* internal cliprect flags */
  79. #define CR_NEEDS_NO_CONCEALED_RASTERS  1
  80. #define CR_NEEDS_NO_LAYERBLIT_DAMAGE   2
  81.  
  82. /* defines for code values for getcode */
  83. #define ISLESSX 1
  84. #define ISLESSY 2
  85. #define ISGRTRX 4
  86. #define ISGRTRY 8
  87.  
  88. #endif    /* GRAPHICS_CLIP_H */
  89.